#ifndef __OgreApplication_h__
#define __OgreApplication_h__

#include <ogre.h>
#include <OgreOde_Core.h>
#include <OgreOde_Prefab.h>
#include <OgreOde_Loader.h>
#include <OgreTextAreaOverlayElement.h>
#include "Caelum.h"
#include "ExampleFrameListener.h"

using namespace Ogre;

class OgreApplication : public FrameListener
{
public:
   OgreApplication(void);
   virtual ~OgreApplication(void);

   virtual void go(void);

protected:
   virtual bool initialise();
   virtual bool initOgreCore();

   virtual void createSceneManager();
   virtual void createCamera();
   virtual void createViewports();
   virtual void createResourceListener();
   virtual void createFrameListener();

   virtual void addResourceLocations();
   virtual void initResources();
	virtual void initTitleScreen() = 0;
   virtual void createScene() = 0; // I am pure virtual, override me!
   virtual void destroyScene();

   Root *mRoot;
   ExampleFrameListener* mFrameListener;
   Camera* mCamera;
   SceneManager* mSceneMgr;
   RenderWindow* mWindow;

     bool *startGame;

   Ogre::SceneNode *mNode;
   /////////////////Ogre Ode///////////////
   OgreOde::World *mWorld;
   OgreOde::Space *mSpace;
   OgreOde::StepHandler *mStepper;	
   OgreOde::TriangleMeshGeometry *mTrack;
   OgreOde::BoxMass mMass;
   Ogre::Entity   *mEntity;
   OgreOde::CollisionListener *mCollision;
   OgreOde::BodyState *mBodyState;

////////////Ode Objects//////////////////

   OgreOde_Prefab::Vehicle *goKart;
   OgreOde_Prefab::Vehicle *goKart2;
   OgreOde_Prefab::Vehicle *aiVehicle;
   OgreOde_Prefab::Vehicle *Obstacle1;
   OgreOde_Prefab::Vehicle *Obstacle2;
   OgreOde_Prefab::Vehicle *Obstacle3;
   OgreOde_Prefab::Vehicle *Obstacle4;
   OgreOde_Prefab::Vehicle *Obstacle5;
   OgreOde_Loader::DotLoader *dotLoader;
   //////////////////////////////////////////
};

#endif // __OgreApplication_h__